package com.gitee.zycra.future.job.client.enums;

/**
 * @author zycra
 */
public enum ScheduleRatioEnum {

    /**
     * 任务进度
     */
    PARENT_NOT_SUCCESS(-5, "父任务未执行"),
    TIMEOUT(-4, "超时"),
    CANCELED(-3, "取消"),
    TRIGGER_FAILED(-2, "调度失败"),
    EXECUTE_FAILED(-1, "执行失败"),
    TO_TRIGGER(0, "未调度"),
    TRIGGER_SUCCESS(1, "已调度"),
    EXECUTE_SUCCESS(100, "成功");

    /**
     * 枚举值
     */
    private final Integer code;

    /**
     * 枚举描述
     */
    private final String desc;

    ScheduleRatioEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
